<% content_for :title do %>
  Edit User #<%=  render :text => @user.id %>
<% end %>
 
<%= form_for :user, :url => user_path(@user.id), :method => 'patch' do |f| %>
  <% if @user.errors.any? %>
  <div id="errorExplanation">
    <h2><%= pluralize(@user.errors.count, "error") %> prohibited
      this user from being saved:</h2>
    <ul>
    <% @user.errors.full_messages.each do |msg| %>
      <li><%= msg %></li>
    <% end %>
    </ul>
  </div>
  <% end %>
  <p>
    <%= f.label :first_name %><br>
    <%= f.text_field :first_name %>
  </p>
 
  <p>
    <%= f.label :last_name %><br>
    <%= f.text_field :last_name %>
  </p>
  
  <p>
    <%= f.label :email_address %><br>
    <%= f.text_field :email_address %>
  </p>

  <p>
    <%= f.submit %>
  </p>
<% end %>
 
<%= link_to 'Back', users_path %>